#define _CRT_SECURE_NO_WARNINGS
#include"SList.h" 

void SLTest()
{
	SLNode* pslist = NULL;
	SLPushBack(&pslist,1);
	SLPushBack(&pslist,2);
	SLPushBack(&pslist,3);
	SLPushFront(&pslist, 4);//4->1->2->3->NULL
	SLPopBack(&pslist);//4->1->2->NULL
	SLPopFront(&pslist);//1->2->NULL


	//SLNode* Index = SLFind(&pslist,4);
	//assert(Index);
	SLNode* Index1 = SLFind(&pslist,1);
	SLInsert(&pslist, Index1, 4);//4->1->2->NULL
	SLNode* Index2 = SLFind(&pslist, 4);
	SLInsertAfter(Index2, 9);//4->9->1->2->NULL
	SLEraseAfter(Index2);//4->1->2->NULL
	SLErase(&pslist, Index2);//1->2->NULL

	SLPrint(pslist);

	SListDesTroy(&pslist);
	SLPrint(pslist);//NULL
	return ;
}

int main()
{

	SLTest();
	return 0;
}